<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\datetime\DateTimePicker;

/* @var $this yii\web\View */
/* @var $model backend\models\ActivitySearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="activity-search">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'options' => [
            'data-pjax' => 1,
            'class'=>'form-inline'
        ],
    ]); ?>

    <?php //= $form->field($model, 'id') ?>

    <?= $form->field($model, 'name') ?>

    <?php //= $form->field($model, 'banner') ?>

    <?php //= $form->field($model, 'activity_catalog')->dropDownList(['全部','满减','满赠','同一商品折扣','不同商品阶梯折扣','组合购买','加价购','买多免一','限时折扣'],['promt'=>$model->activity_catalog]) ?>

    <?php //= $form->field($model, 'peoples') ?>

    <?php // echo $form->field($model, 'start_user_type') ?>

    <?php // echo $form->field($model, 'join_user_type') ?>

    <?php  echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), [
        'options' => ['placeholder' => '', 'autocomplete'=>'off'],
        'pluginOptions' => [
            'autoclose' => true,
            'todayHighlight' => true,
        ],
        'value'=>isset($model->start_time)?$model->start_time:'',
        'layout'=>'{input}{picker}'
    ]); ?>

    <?php  echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), [
        'options' => ['placeholder' => '', 'autocomplete'=>'off'],
        'pluginOptions' => [
            'autoclose' => true,
            'todayHighlight' => true,
        ],
        'value'=>isset($model->end_time)?$model->end_time:'',
        'layout'=>'{input}{picker}'
    ]); ?>


    <?php // echo $form->field($model, 'goods') ?>

    <?php // echo $form->field($model, 'description') ?>

    <?php  echo $form->field($model, 'status')->dropDownList(['全部','上架','下架'],['promt'=>$model->status]) ?>

    <div class="form-group">
        <?= Html::submitButton('搜索', ['class' => 'btn btn-primary']) ?>
        <?= Html::a('创建活动', ['create'], ['class' => 'btn btn-success']) ?>
        <?=Html::tag("div",'',['class'=>'help-block'])?>

    </div>

    <?php ActiveForm::end(); ?>

</div>
